/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>

#import "OFXObject.h"
#import "OFXApplication.h"
#import "OFXFinancialInstitution.h"
#import "OFXStatus.h"
#import "OFXObject.h"

@interface OFXSignOn : OFXObject {
  NSString* accessKey;
  NSDate* dateAccountUpdated;
  NSDate* dateProfileUpdated;
  OFXFinancialInstitution* financialInstitution;
  NSString* userPasswordNew;
  NSString* sessionCookie;
  OFXStatus* status;
  NSString* userKey;
  NSDate*   userKeyExpires;
  NSMutableArray* multiFactorAuthentication;
}

/**
 * @property accessKey
 * @brief Access key that the client should send in the next <SONRQ>, A-1000
 */
@property(retain) NSString* accessKey;

/**
 * @property dateAccountUpdated
 * @brief Date and time of last update to account information
 */
@property(retain) NSDate* dateAccountUpdated;

/**
 * @property dateProfileUpdated
 * @brief Date and time of last update to profile information for any service 
 * supported by this FI
 */
@property(retain) NSDate* dateProfileUpdated;

/**
 * @property financialInstitution
 * @brief Financial Institution identification
 */
@property(retain) OFXFinancialInstitution* financialInstitution;

/**
 * @property userPasswordNew
 * @brief New user password.
 */
@property(retain) NSString* userPasswordNew;

/**
 * @property sessionCookie
 * @brief Session cookie that the client should return on the next <SONRQ>,
 * A-1000
 */
@property(retain) NSString* sessionCookie;

/**
 * @property status
 * @brief Status of response.
 */
@property(retain) OFXStatus* status;

/**
 * @property userKey
 * @brief Use user key instead of USERID and USERPASS for subsequent requests. 
 * userKeyExpires can limit lifetime. A-64
 */
@property(retain) NSString* userKey;

/**
 * @property userKeyExpires
 * @brief Date and time that USERKEY expires
 */
@property(retain) NSDate*   userKeyExpires;

/**
 * @property multiFactorAuthentication
 * @brief Array of multi-factor authentication challenges
 */
@property(retain) NSMutableArray* multiFactorAuthentication;

/**
 * Initialize object
 */
- (id)init;

@end
